jQuery(document).ready(function() {
    document.getElementById("shipInfo").style.display="none";
    var element1;
    var element2;

    element1 = document.getElementsByName("ship.firstName");
    element2 = document.getElementsByName("order.firstName");
    element1[0].value=element2[0].value;

    element1 = document.getElementsByName("ship.lastName");
    element2 = document.getElementsByName("order.lastName");
    element1[0].value=element2[0].value;

    element1 = document.getElementsByName("ship.city");
    element2 = document.getElementsByName("order.city");
    element1[0].value=element2[0].value;

    element1 = document.getElementsByName("ship.country");
    element2 = document.getElementsByName("order.country");
    element1[0].value=element2[0].value;

    element1 = document.getElementsByName("ship.zip");
    element2 = document.getElementsByName("order.zip");
    element1[0].value=element2[0].value;

    element1 = document.getElementsByName("ship.state");
    element2 = document.getElementsByName("order.state");
    element1[0].value=element2[0].value;

    element1 = document.getElementsByName("ship.address1");
    element2 = document.getElementsByName("order.address1");
    element1[0].value=element2[0].value;

    element1 = document.getElementsByName("ship.address2");
    element2 = document.getElementsByName("order.address2");
    element1[0].value=element2[0].value;
});

function change() {
    if(document.getElementById("shipInfo").style.display=="none") {
        document.getElementById("shipInfo").style.display = "";
        var element;
        element = document.getElementsByName("ship.firstName");
        element[0].value="";
        element = document.getElementsByName("ship.lastName");
        element[0].value="";
        element = document.getElementsByName("ship.address1");
        element[0].value="";
        element = document.getElementsByName("ship.address2");
        element[0].value="";
        element = document.getElementsByName("ship.city");
        element[0].value="";
        element = document.getElementsByName("ship.state");
        element[0].value="";
        element = document.getElementsByName("ship.zip");
        element[0].value="";
        element = document.getElementsByName("ship.country");
        element[0].value="";
    }
    else {
        document.getElementById("shipInfo").style.display = "none";
        var element1;
        var element2;

        element1 = document.getElementsByName("ship.firstName");
        element2 = document.getElementsByName("order.firstName");
        element1[0].value=element2[0].value;

        element1 = document.getElementsByName("ship.lastName");
        element2 = document.getElementsByName("order.lastName");
        element1[0].value=element2[0].value;

        element1 = document.getElementsByName("ship.city");
        element2 = document.getElementsByName("order.city");
        element1[0].value=element2[0].value;

        element1 = document.getElementsByName("ship.country");
        element2 = document.getElementsByName("order.country");
        element1[0].value=element2[0].value;

        element1 = document.getElementsByName("ship.zip");
        element2 = document.getElementsByName("order.zip");
        element1[0].value=element2[0].value;

        element1 = document.getElementsByName("ship.state");
        element2 = document.getElementsByName("order.state");
        element1[0].value=element2[0].value;

        element1 = document.getElementsByName("ship.address1");
        element2 = document.getElementsByName("order.address1");
        element1[0].value=element2[0].value;

        element1 = document.getElementsByName("ship.address2");
        element2 = document.getElementsByName("order.address2");
        element1[0].value=element2[0].value;
    }
}